<html>
	</head>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<link href="vue/css/style.css" rel="stylesheet" media="screen">
	<link href="vue/css/bootstrap.min.css" rel="stylesheet" media="screen">	
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<head>
	<body>
		<header>		
			<div class='body_bar'>
				<div class='wrapper'>
					<div class='logo'>
						<h1>Transport de colis<h1>
					</div>
				</div>				
			</div>	
		</header>
		<section class="content">
			<div class='wrapper'>
				<div class='corp'>
					<div class='cont'>
		<form method='get' action="/transport-poo/Index">
			<input type='hidden' name='option' value='consulterExpedition'/>
			<input type='hidden' name='getExp' value='true'/>
			<fieldset>
			<fieldset style="width:30%;">
				<legend>Afficher information Expedition </legend>
				<table rows='5'>
					<tr>
						<td>Numero de l'expedition</td>
						<td><input type='text' name='numExpedition'/></td>
					</tr>
					<tr>
						<td><input type='submit' value='Rechercher'/></td>
						<td></td>
					</tr>
				</table> 
			</fieldset>	
		</form>
		
		<%@ page import="modele.Expedition" %>
		<%@ page import="modele.Client" %>
		<%@ page import="modele.Entrepot" %>
		<%@ page import="modele.Colis" %>
		<%@ page import="modele.Personne" %>
		<% 
			if (request.getParameter("getExp") == "true"){ 
			Expedition e = (Expedition) request.getAttribute("expeditionRes");
			Client c = e.getExpediteur();
		%>
			<fieldset>
			<fieldset style="width:30%;">
				<legend>Informations Client</legend>
				<table rows='5'>
					<tr>
						<td>Numéro du client</td>
						<td><%= c.getNumero() %></td>
					</tr>
					<tr>
						<td>Nom du client</td>
						<td><%= c.getNom() %></td>
					</tr>
					<tr>
						<td>Adresse du client</td>
						<td><%= c.getAdresse() %></td>
					</tr>
					<tr>
						<td>Points de fidélité</td>
						<td></td>
					</tr>
				</table>
			</fieldset>

			<fieldset>
			<fieldset style="width:30%;">
				<legend>Informations destinataire</legend>
				<table rows='5'>
					<tr>
						<td>Nom du destinataire</td>
						<td><%= e.getDestinataire().getNom() %></td>
					</tr>
					<tr>
						<td>Adresse du destinataire</td>
						<td><%= e.getDestinataire().getAdresse() %></td>
					</tr>
				</table>
			</fieldset>	

			<fieldset>
			<fieldset style="width:30%;">
				<legend>information entrepot</legend>
				<table rows='5'>
					<tr>
						<td>Numero entrepot </td>
						<td><%= e.getEntrepot().getNumeroEntrepot() %></td>
					</tr>
				</table>
			</fieldset>		
			<% for (Colis co : e.getColis()){ %>
			<fieldset>
			<fieldset style="width:30%;">
				<legend>Informations colis n°<%= co.getNumero() %></legend>
				<table rows='5'>
					<tr>
						<td>Poids</td>
						<td><%= co.getPoids() %></td>
					</tr>
					<tr>
						<td>Prix</td>
						<td><%= co.getMontant() %></td>
					</tr>
				</table>
			</fieldset>	

			<%	}} %>

				</div>
				</div>
			</div>
		</section>
	</body>
</html>